***                                                                                                                                                                                                                                                       
***                                                                                                                                                                                                                                                       
*** This Program already converted to Y2K                                                                                                                                                                                                                 
*** S&T Departement     on 29 April 1999 by Ben.Rahman                                                                                                                                                                                                    
***                                                                                                                                                                                                                                                       
***                                                                                                                                                                                                                                                       
set cent on                                                                                                                                                                                                                                               
SET DEVI TO PRINT                                                                                                                                                                                                                                         
STORE 0 TO TOTMED,TOTPHR,TOTALL                                                                                                                                                                                                                           
a=year(date())                                                                                                                                                                                                                                            
a=substr(str(a,4),3,2)                                                                                                                                                                                                                                    
mstop = .f.                                                                                                                                                                                                                                               
BR=0                                                                                                                                                                                                                                                      
page = 0                                                                                                                                                                                                                                                  
BB = 3                                                                                                                                                                                                                                                    
AA = 2                                                                                                                                                                                                                                                    
SELE 3                                                                                                                                                                                                                                                    
f3='ph'+kdpat                                                                                                                                                                                                                                             
use &dr&f3                                                                                                                                                                                                                                                
n1=reccount()                                                                                                                                                                                                                                             
l1 = reccount()/11                                                                                                                                                                                                                                        
lx1= int(l1)                                                                                                                                                                                                                                              
GO TOP                                                                                                                                                                                                                                                    
SELE 1                                                                                                                                                                                                                                                    
n2=reccount()                                                                                                                                                                                                                                             
l2 = reccount()/12                                                                                                                                                                                                                                        
lx2= int(l2)                                                                                                                                                                                                                                              
GO TOP                                                                                                                                                                                                                                                    
if l1 > l2                                                                                                                                                                                                                                                
   IF LX1 = 0                                                                                                                                                                                                                                             
      tot_pg = 1                                                                                                                                                                                                                                          
   ELSE                                                                                                                                                                                                                                                   
      if MOD(n1,5)#0                                                                                                                                                                                                                                      
         tot_pg = lx1+1                                                                                                                                                                                                                                   
      else                                                                                                                                                                                                                                                
         tot_pg = lx1                                                                                                                                                                                                                                     
      endif                                                                                                                                                                                                                                               
   ENDIF                                                                                                                                                                                                                                                  
else                                                                                                                                                                                                                                                      
   IF LX2 = 0                                                                                                                                                                                                                                             
      tot_pg = 1                                                                                                                                                                                                                                          
   ELSE                                                                                                                                                                                                                                                   
      if MOD(n2,8)#0                                                                                                                                                                                                                                      
         tot_pg = lx2+1                                                                                                                                                                                                                                   
      else                                                                                                                                                                                                                                                
         tot_pg = lx2                                                                                                                                                                                                                                     
      endif                                                                                                                                                                                                                                               
   ENDIF                                                                                                                                                                                                                                                  
endif                                                                                                                                                                                                                                                     
CT=0                                                                                                                                                                                                                                                      
DO While !mstop                                                                                                                                                                                                                                           
   CT=CT+1                                                                                                                                                                                                                                                
   nCntr = 0                                                                                                                                                                                                                                              
   F6 = 'CTRPRN'                                                                                                                                                                                                                                          
   SELE 6                                                                                                                                                                                                                                                 
   SET EXCLU OFF                                                                                                                                                                                                                                          
   USE &DR&F6                                                                                                                                                                                                                                             
   nCntr = CNTR+1                                                                                                                                                                                                                                         
   IF REC_LOCK()                                                                                                                                                                                                                                          
      REPL CNTR WITH nCntr                                                                                                                                                                                                                                
   ENDIF                                                                                                                                                                                                                                                  
   sele 1                                                                                                                                                                                                                                                 
   IF CT=1                                                                                                                                                                                                                                                
      DO CASE                                                                                                                                                                                                                                             
      CASE NCNTR<10                                                                                                                                                                                                                                       
         NOFT='0000'+STR(NCNTR,1)                                                                                                                                                                                                                         
      CASE NCNTR<100                                                                                                                                                                                                                                      
         NOFT= '000'+STR(NCNTR,2)                                                                                                                                                                                                                         
      CASE NCNTR<1000                                                                                                                                                                                                                                     
         NOFT='00'+STR(NCNTR,3)                                                                                                                                                                                                                           
      case Ncntr<10000                                                                                                                                                                                                                                    
         NOFT='0'+STR(NCNTR,4)                                                                                                                                                                                                                            
      OTHER                                                                                                                                                                                                                                               
         noft=str(Ncntr,5)                                                                                                                                                                                                                                
      ENDCASE                                                                                                                                                                                                                                             
   ENDIF                                                                                                                                                                                                                                                  
                                                                                                                                                                                                                                                          
   mstop = .t.                                                                                                                                                                                                                                            
   do heading                                                                                                                                                                                                                                             
   sele 1                                                                                                                                                                                                                                                 
   DO WHILE !EOF()                                                                                                                                                                                                                                        
      IF BR>22                                                                                                                                                                                                                                            
         MSTOP=.F.                                                                                                                                                                                                                                        
         EXIT                                                                                                                                                                                                                                             
      ENDIF                                                                                                                                                                                                                                               
      KDSH=AREA_CODE+SUB_AREACO+PRO_CODE                                                                                                                                                                                                                  
      @ BR,2 SAY KDSH                                                                                                                                                                                                                                     
      @ BR,8 SAY SHRT_DESCR                                                                                                                                                                                                                               
      IF AREA_CODE<>'E'                                                                                                                                                                                                                                   
         @ BR,36 SAY DOC_CODE                                                                                                                                                                                                                             
         @ BR,44 SAY DOC_ALIAS                                                                                                                                                                                                                            
      ENDIF                                                                                                                                                                                                                                               
      @ BR,58 SAY PROC_X                                                                                                                                                                                                                                  
      PROPAY=PROC_PAY                                                                                                                                                                                                                                     
      DO SAYG WITH BR,67,PROPAY,'99,999.99','9,999,999'                                                                                                                                                                                                   
      TOTMED=TOTMED+PROC_PAY                                                                                                                                                                                                                              
      TOTALL=TOTALL+PROC_PAY                                                                                                                                                                                                                              
      sele 1                                                                                                                                                                                                                                              
      SKIP                                                                                                                                                                                                                                                
      BR=BR+1                                                                                                                                                                                                                                             
   ENDDO                                                                                                                                                                                                                                                  
   do heading2                                                                                                                                                                                                                                            
   sele 3                                                                                                                                                                                                                                                 
   DO WHILE !EOF()                                                                                                                                                                                                                                        
      IF BR>40                                                                                                                                                                                                                                            
         SELE 3                                                                                                                                                                                                                                           
         MSTOP=.F.                                                                                                                                                                                                                                        
         EXIT                                                                                                                                                                                                                                             
      ENDIF                                                                                                                                                                                                                                               
      KDTEMP=PHAR_CODE                                                                                                                                                                                                                                    
      PAYTMP=PHAR_PAY                                                                                                                                                                                                                                     
      XTEM=PHAR_X                                                                                                                                                                                                                                         
      @ BR,2 SAY KDTEMP                                                                                                                                                                                                                                   
*      IF PILH=1                                                                                                                                                                                                                                          
         @ BR,8 SAY RTRIM(PHAR_NAME)+'  '+RTRIM(PHAR_TYPE)+'  '+rtrim(PHAR_QANT)+'  '+PHAR_UNIT                                                                                                                                                           
*      ELSE                                                                                                                                                                                                                                               
*         if subs(KDTEMP,2,1)$'01458'                                                                                                                                                                                                                     
*            @ BR,8 SAY 'D R U G'                                                                                                                                                                                                                         
*         else                                                                                                                                                                                                                                            
*            @ BR,8 SAY 'DISPOSABLE'                                                                                                                                                                                                                      
*         endi                                                                                                                                                                                                                                            
*      ENDIF                                                                                                                                                                                                                                              
      @ BR,49 SAY PHAR_X                                                                                                                                                                                                                                  
      WSALPRIC=SALE_PRICE                                                                                                                                                                                                                                 
      DO SAYG WITH BR,55,WSALPRIC,'9,999.99','999,999'                                                                                                                                                                                                    
      PHAPAY=PHAR_PAY                                                                                                                                                                                                                                     
      DO SAYG WITH BR,67,PHAPAY,'99,999.99','9,999,999'                                                                                                                                                                                                   
*      IF SUBSTR(KDTEMP,2,1)='6' .OR. SUBS(KDTEMP,2,1)='7' .OR. SUBSTR(KDTEMP,2,1)='9'                                                                                                                                                                    
*         F10='DISPOS'                                                                                                                                                                                                                                    
*      ELSE                                                                                                                                                                                                                                               
*         F10='DRUGS'                                                                                                                                                                                                                                     
*      ENDIF                                                                                                                                                                                                                                              
*      SELE 10                                                                                                                                                                                                                                            
*     USE &DR&F10 INDEX &DR&F10                                                                                                                                                                                                                           
*      SEEK KDTEMP                                                                                                                                                                                                                                        
*      IF REC_LOCK(0)                                                                                                                                                                                                                                     
*         REPL ST_ACT_TOT WITH ST_ACT_TOT-XTEM                                                                                                                                                                                                            
*        REPL ST_ACT_BUY WITH INT(ST_ACT_TOT/BUY_SELL_R)                                                                                                                                                                                                  
*         REPL ST_ACT_SEL WITH ST_ACT_TOT-(ST_ACT_BUY*BUY_SELL_R)                                                                                                                                                                                         
*      ENDIF                                                                                                                                                                                                                                              
*      UNLOCK                                                                                                                                                                                                                                             
                                                                                                                                                                                                                                                          
                                                                                                                                                                                                                                                          
      F10='DRUGS'                                                                                                                                                                                                                                         
      SELE 10                                                                                                                                                                                                                                             
      USE &DR&F10 INDEX &DR&F10                                                                                                                                                                                                                           
      SEEK KDTEMP                                                                                                                                                                                                                                         
      IF .NOT. EOF()                                                                                                                                                                                                                                      
         IF REC_LOCK(0)                                                                                                                                                                                                                                   
            REPL ST_ACT_TOT WITH ST_ACT_TOT-XTEM                                                                                                                                                                                                          
            REPL ST_ACT_BUY WITH INT(ST_ACT_TOT/BUY_SELL_R)                                                                                                                                                                                               
            REPL ST_ACT_SEL WITH ST_ACT_TOT-(ST_ACT_BUY*BUY_SELL_R)                                                                                                                                                                                       
         ENDIF                                                                                                                                                                                                                                            
         UNLOCK                                                                                                                                                                                                                                           
      ELSE                                                                                                                                                                                                                                                
         F10='DISPOS'                                                                                                                                                                                                                                     
         USE &DR&F10 INDE &DR&F10                                                                                                                                                                                                                         
         SEEK KDTEMP                                                                                                                                                                                                                                      
         IF .NOT. EOF()                                                                                                                                                                                                                                   
           IF REC_LOCK(0)                                                                                                                                                                                                                                 
              REPL ST_ACT_TOT WITH ST_ACT_TOT-XTEM                                                                                                                                                                                                        
              REPL ST_ACT_BUY WITH INT(ST_ACT_TOT/BUY_SELL_R)                                                                                                                                                                                             
              REPL ST_ACT_SEL WITH ST_ACT_TOT-(ST_ACT_BUY*BUY_SELL_R)                                                                                                                                                                                     
           ENDIF                                                                                                                                                                                                                                          
           UNLOCK                                                                                                                                                                                                                                         
         ENDIF                                                                                                                                                                                                                                            
      ENDIF                                                                                                                                                                                                                                               
                                                                                                                                                                                                                                                          
      TOTPHR=TOTPHR+PAYTMP                                                                                                                                                                                                                                
      TOTALL=TOTALL+PAYTMP                                                                                                                                                                                                                                
      BR=BR+1                                                                                                                                                                                                                                             
      sele 3                                                                                                                                                                                                                                              
      SKIP                                                                                                                                                                                                                                                
   ENDDO                                                                                                                                                                                                                                                  
   IF !mstop                                                                                                                                                                                                                                              
      EJECT                                                                                                                                                                                                                                               
      loop                                                                                                                                                                                                                                                
   endif                                                                                                                                                                                                                                                  
   @ 46,1   SAY REPL('-',79)                                                                                                                                                                                                                              
   @ 47,1   SAY 'MEDICAL:'+AEACURR                                                                                                                                                                                                                        
   DO SAYG WITH 47,12,TOTMED,'99,999.99','9,999,999'                                                                                                                                                                                                      
   @ 47,24  SAY 'PHARMACY :'+AEACURR                                                                                                                                                                                                                      
   DO SAYG WITH 47,40,TOTPHR,'99,999.99','9,999,999'                                                                                                                                                                                                      
   @ 47,52  SAY 'TOTAL :'+AEACURR                                                                                                                                                                                                                         
   DO SAYG WITH 47,67,TOTALL,'99,999.99','9,999,999'                                                                                                                                                                                                      
   @ 48,1   SAY REPL('=',79)                                                                                                                                                                                                                              
*   IF PL19=2                                                                                                                                                                                                                                             
   IF PRTDIAG                                                                                                                                                                                                                                             
      @ 49, 1 SAY 'Diagnosis : '+subs(DIAGNAME,1,35)                                                                                                                                                                                                      
   ENDIF                                                                                                                                                                                                                                                  
      @ 49,52  SAY 'TOTAL :'+AEABCUR                                                                                                                                                                                                                      
      DO SAYG WITH 49,67,OTAMO,'9,999,999','9,999,999'                                                                                                                                                                                                    
*   ENDIF                                                                                                                                                                                                                                                 
                                                                                                                                                                                                                                                          
   IF TOTALL = 0                                                                                                                                                                                                                                          
      IF HEALTH=.T.                                                                                                                                                                                                                                       
         @ 50, 25  SAY "H E A L T H L I N E   F O R M"                                                                                                                                                                                                    
	 do decl_med                                                                                                                                                                                                                                             
         @ 55,2  SAY "The cost of this treatment is entirely borne by P.PROGRAM, a prepaid"                                                                                                                                                               
         @ 56,2  SAY "medical care program offered by "+alltrim(aeaname)                                                                                                                                                                                  
	 do foot_inv                                                                                                                                                                                                                                             
      ENDIF                                                                                                                                                                                                                                               
      IF PILC=9                                                                                                                                                                                                                                           
         @ 50, 25  SAY " N O   C H A R G E   F O R M "                                                                                                                                                                                                    
         do decl_med                                                                                                                                                                                                                                      
         @ 55,2  SAY "The cost of this treatment is entirely borne by"                                                                                                                                                                                    
         @ 56,2  say alltrim(aeaname)+"."                                                                                                                                                                                                                 
         do foot_inv                                                                                                                                                                                                                                      
      endif                                                                                                                                                                                                                                               
   ELSE                                                                                                                                                                                                                                                   
      if PILC=3                                                                                                                                                                                                                                           
         @ 50,25  SAY "P A Y M E N T   R E C E I P T"                                                                                                                                                                                                     
         do decl_med                                                                                                                                                                                                                                      
         @ 55,2  say "Paid, the sum of : "+AEACURR                                                                                                                                                                                                        
         DO SAYG WITH 55,25,TOTALL,'999,999.99','99,999,999'                                                                                                                                                                                              
         @ 55,37 say 'by : '+paymode                                                                                                                                                                                                                      
         IF PL19=2                                                                                                                                                                                                                                        
            @ 56, 21 SAY OTCUR                                                                                                                                                                                                                            
            DO SAYG WITH 56,25,OTAMO,'99,999,999','99,999,999'                                                                                                                                                                                            
         ENDIF                                                                                                                                                                                                                                            
                                                                                                                                                                                                                                                          
         do foot_inv                                                                                                                                                                                                                                      
      else                                                                                                                                                                                                                                                
         if pilc=7                                                                                                                                                                                                                                        
            @ 50,26  SAY "C R E D I T   V O U C H E R"                                                                                                                                                                                                    
            @ 52, 2  SAY 'I,Mr/Ms ' + RTRIM(FNMPAT)+' '+NMPAT + ', Dependant of '+depper+ ' have received MEDICAL TREATMENT'                                                                                                                              
            @ 53, 2  SAY 'at the ' + alltrim(aeaname) + ' on ' + subs(dtoc(DATE()),1,2) + '/' + subs(dtoc(DATE()),4,2) + '/' + subs(dtoc(DATE()),7,4)                                                                                                     
            @ 55, 2  SAY "Send Invoice to : "+alltrim(aeaname)+" Tel :"+alltrim(atelp)                                                                                                                                                                    
            @ 56, 2  SAY "to the attention of : Personnel Department"                                                                                                                                                                                     
            do foot_inv                                                                                                                                                                                                                                   
         else                                                                                                                                                                                                                                             
            @ 50,26  SAY "C R E D I T   V O U C H E R"                                                                                                                                                                                                    
	    do decl_med                                                                                                                                                                                                                                          
            DO CASE                                                                                                                                                                                                                                       
               CASE PILC=2                                                                                                                                                                                                                                
                                                                                                                                                                                                                                                          
                 IF PL19=2                                                                                                                                                                                                                                
                    @ 55,2 say "Paid, the sum of : "+otcur+' '+trans(partothe,'##,###,###')+' ('+aeacurr+' '+trans(partcash,'##,###.##')+' by :'+paymode                                                                                                  
*                    DO SAYG WITH 55,25,PARTCASH,'999,999.99','99,999,999'                                                                                                                                                                                
*                    @ 55,36 SAY  ' / '+OTCUR                                                                                                                                                                                                             
*                    DO SAYG WITH 55,43,PARTOTHE,'999,999.99','99,999,999'                                                                                                                                                                                
                 ELSE                                                                                                                                                                                                                                     
                    DO SAYG WITH 55,25,PARTCASH,'999,999.99','99,999,999'                                                                                                                                                                                 
                    @ 55,57 say 'by : '+paymode                                                                                                                                                                                                           
                 ENDIF                                                                                                                                                                                                                                    
                 @ 56, 2  SAY "The balance payable to the Clinic for this treatment is : "+AEACURR                                                                                                                                                        
                 DO SAYG WITH 56,67,PARTCRED,'999,999.99','99,999,999'                                                                                                                                                                                    
               CASE PILC=4                                                                                                                                                                                                                                
                 @ 55,2 SAY "Your P.PROGRAM renewal has not been processed, yet"                                                                                                                                                                          
                 @ 56,2 SAY "The amount payable to the Clinic for this treatment is  : "+AEACURR                                                                                                                                                          
                 DO SAYG WITH 56,66,TOTALL,'999,999.99','99,999,999'                                                                                                                                                                                      
               OTHER                                                                                                                                                                                                                                      
                 IF AUTHOR<>SPACE(16)                                                                                                                                                                                                                     
                    @ 55,2 SAY "CREDIT AUTHORIZED BY : "+AUTHOR PICT "@!"                                                                                                                                                                                 
                 ENDIF                                                                                                                                                                                                                                    
                 @ 56,2  SAY "The amount payable to the Clinic for this treatment is  : "+AEACURR                                                                                                                                                         
                 DO SAYG WITH 56,66,TOTALL,'999,999.99','99,999,999'                                                                                                                                                                                      
            ENDCASE                                                                                                                                                                                                                                       
            @  57,2  SAY "Invoice to : _____________________________________ Tel : ________________"                                                                                                                                                      
            @  58,2  SAY "Company : _______________________________________________________________"                                                                                                                                                      
            @  59,2  SAY "Address : _______________________________________________________________"                                                                                                                                                      
            @  60,2  say "          ________________________________________ Tel : ________________"                                                                                                                                                      
            @  61,2  SAY "to the attention of : ________________________(Name of Authorized Person)"                                                                                                                                                      
            @  62, 9 say subs(dtoc(date()),1,2)                                                                                                                                                                                                           
            @  62,11 SAY '/'                                                                                                                                                                                                                              
            @  62,12 SAY subs(dtoc(DATE()),4,2)                                                                                                                                                                                                           
            @  62,14 SAY '/'                                                                                                                                                                                                                              
            @  62,15 SAY subs(dtoc(DATE()),7,4)                                                                                                                                                                                                           
            @  62,39 SAY 'SIGNATURE : '                                                                                                                                                                                                                   
         endif                                                                                                                                                                                                                                            
      ENDIF                                                                                                                                                                                                                                               
   ENDIF                                                                                                                                                                                                                                                  
ENDDO                                                                                                                                                                                                                                                     
EJECT                                                                                                                                                                                                                                                     
SET DEVI TO SCREE                                                                                                                                                                                                                                         
                                                                                                                                                                                                                                                          
                                                                                                                                                                                                                                                          
Procedure decl_med                                                                                                                                                                                                                                        
*-----------------                                                                                                                                                                                                                                        
@ 52, 2 SAY 'I,Mr/Ms ' + RTRIM(FNMPAT)+' '+NMPAT + ' have received MEDICAL TREATMENT'                                                                                                                                                                     
@ 53, 2 SAY 'at the '+alltrim(aeaname)+' on '+subs(dtoc(DATE()),1,2) + '/' + subs(dtoc(DATE()),4,2) + '/' + subs(dtoc(DATE()),7,4)                                                                                                                        
                                                                                                                                                                                                                                                          
                                                                                                                                                                                                                                                          
Procedure foot_inv                                                                                                                                                                                                                                        
*-----------------                                                                                                                                                                                                                                        
@ 62, 2 SAY 'DATE : '                                                                                                                                                                                                                                     
@ 62, 9 SAY subs(dtoc(DATE()),1,2)                                                                                                                                                                                                                        
@ 62,11 SAY '/'                                                                                                                                                                                                                                           
@ 62,12 SAY subs(dtoc(DATE()),4,2)                                                                                                                                                                                                                        
@ 62,14 SAY '/'                                                                                                                                                                                                                                           
@ 62,15 SAY subs(dtoc(DATE()),7,4)                                                                                                                                                                                                                        
@ 62,39 SAY 'SIGNATURE : '                                                                                                                                                                                                                                
                                                                                                                                                                                                                                                          
                                                                                                                                                                                                                                                          
Procedure Heading                                                                                                                                                                                                                                         
*----------------                                                                                                                                                                                                                                         
TITLE1=ALLTRIM(AEANAME)+' - '+ALLTRIM(AEACOUN)                                                                                                                                                                                                            
TITLE2=ALLTRIM(AEAADDR)+' - '+ALLTRIM(AEACITY)                                                                                                                                                                                                            
                                                                                                                                                                                                                                                          
                                                                                                                                                                                                                                                          
BR=12                                                                                                                                                                                                                                                     
page=page+1                                                                                                                                                                                                                                               
@ 0,1  SAY REPL('=',79)                                                                                                                                                                                                                                   
@ 1,  2 SAY ALLTRIM(USERNM)+'-'+KPIX                                                                                                                                                                                                                      
@ 1, 40-(LEN(TITLE1)/2) SAY TITLE1                                                                                                                                                                                                                        
@ 1,68 SAY  a+'/'+str(MONTH(DATE()),2)+'/'+NOFT                                                                                                                                                                                                           
@  2, 40-(LEN(TITLE2)/2) SAY TITLE2                                                                                                                                                                                                                       
@ 3, 2 SAY DATE()                                                                                                                                                                                                                                         
@ 3,69 say 'PAGE: ' + str(page,1) + '/' + str(tot_pg,1)                                                                                                                                                                                                   
@ 4, 2 SAY TIME()                                                                                                                                                                                                                                         
@ 4,21 SAY 'I N V O I C E'                                                                                                                                                                                                                                
@ 4,44 SAY 'PATIENT CODE :'                                                                                                                                                                                                                               
@ 4,59  SAY KDPAT                                                                                                                                                                                                                                         
DO CASE                                                                                                                                                                                                                                                   
   CASE TPPAT='0'                                                                                                                                                                                                                                         
        @  4, 68  SAY '(EMPLOYEE)'                                                                                                                                                                                                                        
   CASE TPPAT='5'                                                                                                                                                                                                                                         
        @  4, 68  SAY '(MEMBER)'                                                                                                                                                                                                                          
ENDC                                                                                                                                                                                                                                                      
@  6, 1   SAY 'SURNAME:'                                                                                                                                                                                                                                  
@  6, 11  SAY NMPAT                                                                                                                                                                                                                                       
@  6, 28  SAY 'FIRST NAME:'                                                                                                                                                                                                                               
@  6, 40  SAY FNMPAT                                                                                                                                                                                                                                      
@  6, 57  SAY 'MID.INITIAL:'                                                                                                                                                                                                                              
@  6, 70  SAY MNMPAT                                                                                                                                                                                                                                      
@  7, 1   SAY 'BIRTH DATE :'                                                                                                                                                                                                                              
@  7, 14  SAY subs(dtoc(DOBPAT),1,2)                                                                                                                                                                                                                      
@  7, 16  SAY '/'                                                                                                                                                                                                                                         
@  7, 17  SAY subs(dtoc(DOBPAT),4,2)                                                                                                                                                                                                                      
@  7, 19  SAY '/'                                                                                                                                                                                                                                         
@  7, 20  SAY subs(dtoc(DOBPAT),7,4)                                                                                                                                                                                                                      
@  7, 26  SAY 'NATIONALITY :'                                                                                                                                                                                                                             
@  7, 40  SAY NATIO                                                                                                                                                                                                                                       
@  7, 57  SAY 'SEX (M/F)  :'                                                                                                                                                                                                                              
@  7, 70  SAY ISEX                                                                                                                                                                                                                                        
@  8,1   SAY REPL('=',79)                                                                                                                                                                                                                                 
@ 10,8   SAY 'MEDICAL PROCEDURES                  DOCTOR                     PRICE'                                                                                                                                                                       
@ 11,1   SAY REPL('-',79)                                                                                                                                                                                                                                 
                                                                                                                                                                                                                                                          
                                                                                                                                                                                                                                                          
Procedure Heading2                                                                                                                                                                                                                                        
*-----------------                                                                                                                                                                                                                                        
BR=29                                                                                                                                                                                                                                                     
@ 25,1  SAY REPL('-',79)                                                                                                                                                                                                                                  
@ 27,8  SAY 'DRUGS & DISPOSABLES                     QUANT.  U.PRICE  TOTAL PRICE'                                                                                                                                                                        
@ 28,1  SAY REPL('-',79)                                                                                                                                                                                                                                  
